import request from '@/utils/request'

// 查询作业列表
export function listPractice(query) {
  return request({
    url: '/exam/practice/list',
    method: 'get',
    params: query
  })
}

// 查询作业详细
export function getPractice(practiceId) {
  return request({
    url: '/exam/practice/' + practiceId,
    method: 'get'
  })
}

// 新增作业
export function addPractice(data) {
  return request({
    url: '/exam/practice',
    method: 'post',
    data: data
  })
}

// 修改作业
export function updatePractice(data) {
  return request({
    url: '/exam/practice',
    method: 'put',
    data: data
  })
}

// 删除作业
export function delPractice(practiceId) {
  return request({
    url: '/exam/practice/' + practiceId,
    method: 'delete'
  })
}

// 导出作业
export function exportPractice(query) {
  return request({
    url: '/exam/practice/export',
    method: 'get',
    params: query
  })
}